<!doctype html>
<html lang="en">

<head>
  <title>Title</title>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  <!-- Bootstrap CSS -->
  <link rel="stylesheet" href="../css/bootstrap.min.css">
  <script src="../js/vue.js"></script>
  <script src="../js/axios.min.js"></script>

</head>

<body>
  <!-- UI -->
  <div id="app">
    <div class="jumbotron jumbotron-fluid my-0 text-center">
      <div class="container">
        <h1 class="display-3">医生门诊站</h1>
      </div>
    </div>
    <div class="my-0">
      <nav class="breadcrumb">
        <span class="btn btn-primary btn-lg">医生门诊</span>
        <a class="btn btn-primary btn-lg" href="bill.html" role="button">统一发票</a>
        <a class="btn btn-primary btn-lg" href="charge.html" role="button">结账收费</a>
        <a class="btn btn-primary btn-lg" href="template/paiban/paiban.html" role="button">医生排班</a>
        <a class="btn btn-primary btn-lg" href="yuyue.html" role="button">医生预约</a>
      </nav>
    </div>
    <div class="container-fluid">
      <div class="row">
        <div class="col-lg-12">
          <table class="table">
            <thead>
              <tr>
                <th>医生</th>
                <th>科室</th>
                <th>患者</th>
                <th>医嘱状态</th>
                <th>开医嘱时间</th>
                <th>缴费时间</th>
                <th>领药时间</th>
                <th>护士站是否执行</th>
                <th>护士站打印抽血条码</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
              <tr v-for="(enjoin, index) in enjoinList" :key="index">
                <td>{{enjoin.doctor.name}}</td>
                <td>{{enjoin.dept.name}}</td>
                <td>{{enjoin.patirnt.name}}</td>
                <td>{{enjoin.status}}</td>
                <td>{{enjoin.enjoinTime}}</td>
                <td>{{enjoin.payTime}}</td>
                <td>{{enjoin.getTime}}</td>
                <td>{{enjoin.isrun}}</td>
                <td>{{enjoin.isblood}}</td>
                <td>
                  <button type="button" class="btn btn-primary">操作</button>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
  <script>
    new Vue({
      el: "#app",
      // 属性
      data: {
        enjoinList: [],
      },
      // 方法
      mothods: {

      },
      // 计算函数
      computed: {

      },
      // 回调函数
      created() {
        let url = '/EnjoinAll'
        axios.get(url)
          .then(res => {
            console.log(res)
            this.enjoinList = res.data;
            console.log(this.enjoinList);
          })
          .catch(err => {
            console.error(err);
          })
      },
      // 
      mounted() {

      },
    })
  </script>

</body>

</html>